package com.dingreading.cloud.soms.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2023-11-22
 */
@Data
@Table(value = "borrow_book")
public class BorrowBook implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date returnTime;

    /**
     * 公司uid
     */
    @ApiModelProperty(value = "公司uid")
    private String corpUid;

    /**
     * 门店uid
     */
    @ApiModelProperty(value = "门店uid")
    private String storeUid;

    /**
     * 门店名称
     */
    @ApiModelProperty(value = "门店名称")
    private String storeName;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 还书备注
     */
    @ApiModelProperty(value = "还书备注")
    private String returnRemark;

    /**
     * 借阅状态 1.借阅中 2.已还书
     */
    @ApiModelProperty(value = "借阅状态 1.借阅中 2.已还书")
    private Integer status;

    /**
     * 借书数量
     */
    @ApiModelProperty(value = "借书数量")
    private Integer borrowNum;

    /**
     * 还书数量
     */
    @ApiModelProperty(value = "还书数量")
    private Integer returnNum;

    /**
     * 借书人uid
     */
    @ApiModelProperty(value = "借书人uid")
    private String memberUid;

    /**
     * 借书人姓名
     */
    @ApiModelProperty(value = "借书人姓名")
    private String name;

    /**
     * 借书人电话
     */
    @ApiModelProperty(value = "借书人电话")
    private String mob;

    /**
     * 添加操作人uid
     */
    @ApiModelProperty(value = "添加操作人uid")
    private String addStaffUid;

    /**
     * 添加操作人名
     */
    @ApiModelProperty(value = "添加操作人名")
    private String addStaffName;

    /**
     * 更新操作人uid
     */
    @ApiModelProperty(value = "更新操作人uid")
    private String editStaffUid;

    /**
     * 更新操作人名
     */
    @ApiModelProperty(value = "更新操作人名")
    private String editStaffName;

    /**
     * 预计借阅天数
     */
    @ApiModelProperty(value = "预计借阅天数")
    private Integer bookDay;

    /**
     * 预计还书时间
     */
    @ApiModelProperty(value = "预计还书时间")
    private String bookTime;

    /**
     * 最新会员名称
     */
    @Column(ignore = true)
    private String newMemberName;

    @Column(ignore = true)
    private List<BorrowBookLog> list;

}
